package com.s63.appinfo.controller;

import com.s63.appinfo.pojo.AjaxResult;
import com.s63.appinfo.service.DataDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dataDictionary")
public class DataDictionaryController {
    @Autowired
    private DataDictionaryService dataDictionaryService;

    @GetMapping("/{typeCode}")
    public AjaxResult getByTypeName(@PathVariable String typeCode) {
        return AjaxResult.ok(dataDictionaryService.getByTypeCode(typeCode));
    }
}
